package com.stone.design.practice.mvp.model;

/**
 * @author Stone
 * @version V1.0
 * @description:
 * @date 7/6/18 09:33
 * @email redsstone@163.com
 */
public class UserModel implements IUser{

    String name;
    String password;

    public UserModel(String name, String password) {
        this.name = name;
        this.password = password;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public String getPassword() {
        return password;
    }

    @Override
    public int checkUserValidity(String name, String password) {
        if (name==null||password==null||!name.equals(getName())||!password.equals(getPassword())){
            return -1;
        }
        return 0;
    }
}
